/*
 * @Author: long-xinyu2 2192763423@qq.com
 * @Date: 2025-03-11 18:47:55
 * @LastEditors: long-xinyu2 2192763423@qq.com
 * @LastEditTime: 2025-04-02 17:55:42
 * @FilePath: \algorithm\algorithm-training\2025_3_11.cpp
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#include<iostream>
#include<cstring>
#include<vector>
#include<map>
#include<cstdio>
#include<algorithm>
#include<string>
#include<string.h>
#include<queue>
#include<math.h>
#include<set>
#include<functional>
#include<bits/stdc++.h>
using namespace std;
#define int long long
//using i128 = __int128_t;
inline int inc(int x, int v, int mod) { x += v;return x >= mod ? x - mod : x; }//代替取模+
#define endl '\n'
typedef long long LL;
typedef unsigned long long ULL;
typedef pair<int, int> PII;

const int N = 2e3 + 10, M = 1e5 + 10;

inline int read()
{
    int x = 0, f = 1;
    char ch = getchar();
    while (ch < '0' || ch > '9')
    {
        if (ch == '-')
            f = -1;
        ch = getchar();
    }
    while (ch >= '0' && ch <= '9')
        x = x * 10 + ch - '0', ch = getchar();
    return x * f;
}
//高精度加法 C = A + B, A >= 0, B >= 0
string add(string str1,string str2)//高精度加法
{
    string str;

    int len1=str1.length();
    int len2=str2.length();
    //前面补0，弄成长度相同
    if(len1<len2)
    {
        for(int i=1;i<=len2-len1;i++)
           str1="0"+str1;
    }
    else
    {
        for(int i=1;i<=len1-len2;i++)
           str2="0"+str2;
    }
    len1=str1.length();
    int cf=0;
    int temp;
    for(int i=len1-1;i>=0;i--)
    {
        temp=str1[i]-'0'+str2[i]-'0'+cf;
        cf=temp/10;
        temp%=10;
        str=char(temp+'0')+str;
    }
    if(cf!=0)  str=char(cf+'0')+str;
    return str;
}

string mul(string str1,string str2)
{
    string str;
    int len1=str1.length();
    int len2=str2.length();
    string tempstr;
    for(int i=len2-1;i>=0;i--)
    {
        tempstr="";
        int temp=str2[i]-'0';
        int t=0;
        int cf=0;
        if(temp!=0)
        {
            for(int j=1;j<=len2-1-i;j++)
              tempstr+="0";
            for(int j=len1-1;j>=0;j--)
            {
                t=(temp*(str1[j]-'0')+cf)%10;
                cf=(temp*(str1[j]-'0')+cf)/10;
                tempstr=char(t+'0')+tempstr;
            }
            if(cf!=0) tempstr=char(cf+'0')+tempstr;
        }
        str=add(str,tempstr);
    }
    str.erase(0,str.find_first_not_of('0'));
    return str;
}

void solve()
{
    int x;
    cin >> x;
    string ans = "2";
    string tt = "2";
    for(int i = 2; i <= x; i ++)
    {
        ans = mul(ans,"2");
        ans = add(ans,tt);
    }
    for(int i = 0; i <ans.size(); i ++)
    {
        cout << ans[i];
    }
}
signed main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    int tt;
    //cin >> tt;
    tt = 1;
    while (tt--)
    {
        solve();
    }
}